/***************************************************************************
   Filename:    StateMachine.cpp
   Author:      Josh Partridge
   Description: The StateMachine class primarily holds a State enum
****************************************************************************/
#include "StateMachine.h"

/************************************************************************************
 Name:               Paddle - constructor
 Description:        initializes StateMachine's state
*************************************************************************************/
StateMachine::StateMachine (State init)
{
    gameState = init;
}

/************************************************************************************
 Name:               getState
 Description:        getter for the State
 Output:
             return: State representing StateMachine's state
*************************************************************************************/
State StateMachine::getState ()
{
    return gameState;
}

/************************************************************************************
 Name:               getState
 Description:        getter for reference to State
 Output:
             return: reference to StateMachine's state
*************************************************************************************/
State& StateMachine::getStateRef()
{
    return gameState;
}

/************************************************************************************
 Name:               setState
 Description:        setter for State
 Input:
                  v: State representing new State
*************************************************************************************/
void StateMachine::setState (State set)
{
    gameState = set;
}
